|
Install BIND
2015/11/21 |
|
Install BIND to configure DNS server which resolves domain name or IP address. BIND uses 53/TCP,UDP.
|
|
| [1] | Install BIND. |
|
dlp:~ # zypper -n install bind bind-utils
|
| [2] | Configure BIND. This example is done with grobal IP address [172.16.0.80/29], Private IP address [10.0.0.0/24], Domain name [srv.world]. However, Please use your own IPs and domain name when you set config on your server. ( Actually, [172.16.0.80/29] is for private IP address, though. ) |
|
dlp:~ # mv /etc/named.conf /etc/named.conf.org
dlp:~ #
vi /etc/named.conf # create new
options {
directory "/var/lib/named";
managed-keys-directory "/var/lib/named/dyn/";
dump-file "/var/log/named_dump.db";
statistics-file "/var/log/named.stats";
# specify it if listen IPv4 port
listen-on port 53 { any; };
# specify it if listen IPv6 port
listen-on-v6 { any; };
# query range
allow-query { 127.0.0.1; 10.0.0.0/24; };
# transfer range
allow-transfer { 127.0.0.1; 10.0.0.0/24; };
recursion yes;
};
view "internal" {
match-clients {
localhost;
10.0.0.0/24;
};
zone "." in {
type hint;
file "root.hint";
};
zone "localhost" in {
type master;
file "localhost.zone";
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "127.0.0.zone";
};
zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "127.0.0.zone";
};
zone "srv.world" in {
type master;
file "srv.world.lan";
allow-update { none; };
};
zone "0.0.10.in-addr.arpa" in {
type master;
file "0.0.10.db";
allow-update { none; };
};
};
view "external" {
match-clients { any; };
allow-query { any; };
recursion no;
zone "srv.world" in {
type master;
file "srv.world.wan";
allow-update { none; };
};
zone "80.0.16.172.in-addr.arpa" in {
type master;
file "80.0.16.172.db";
allow-update { none; };
};
};
# allow-query ⇒ query range you permit
# allow-transfer ⇒ the range you permit to transfer zone info
# recursion ⇒ allow or not to search recursively
# view "internal" { *** }; ⇒ write for internal definition
# view "external" { *** }; ⇒ write for external definition
# For How to write for reverse resolving, Write network address reversely like below
# 10.0.0.0/24
# network address ⇒ 10.0.0.0
# range of network ⇒ 10.0.0.0 - 10.0.0.255
# how to write ⇒ 0.0.10.in-addr.arpa
# 172.16.0.80/29
# network address ⇒ 172.16.0.80
# range of network ⇒ 172.16.0.80 - 172.16.0.87
# how to write ⇒ 80.0.16.172.in-addr.arpa
|